package com.example.study.model;

import com.example.study.model.group.Insert;
import com.example.study.model.group.Update;
import com.example.study.validator.CheckTimeInterval;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode()
@ToString
@CheckTimeInterval(groups = {Insert.class}, startTime = "startTime", endTime = "endTime", format = "HH:mm", message = "开始时间不能大于接收时间")
public class CourseDateVO implements Serializable {
    @NotNull(groups = {Update.class}, message = "课程表ID不能为空")
    @ApiModelProperty(value = "课程表ID")
    private Long id;
    @ApiModelProperty(value = "课程ID")
    @NotNull(groups = {Insert.class}, message = "课程ID不能为空")
    private Long courseId;
    @ApiModelProperty(value = "课程表年度")
    @NotBlank(groups = {Insert.class}, message = "年度不能为空")
    private String year;
    @ApiModelProperty(value = "课程表周几")
    @NotBlank(groups = {Insert.class}, message = "周几不能为空")
    private String week;
    @ApiModelProperty(value = "课程上课开始时间")
    @NotNull(groups = {Insert.class}, message = "课程开始时间不能为空")
    private String startTime;
    @ApiModelProperty(value = "课程下课结束时间")
    @NotNull(groups = {Insert.class}, message = "课程结束不能为空")
    private String endTime;
}
